package Throwable;

public class throw_ {
    /*
    * 手动抛出异常
    * */
    public static void testThrow(int j){
        int i = 10;

        if (j>0){
            System.out.println(i/j);
        }else {
            throw new RuntimeException("分母不能为零！");
        }
    }

    public static void main(String[] args) {
        throw_.testThrow(10);
    }
}
